<?php
/*
	$id
	$page
*/
$CI = &get_instance();
$CI->load->database();
$CI->db->where('ID_admin', $id);
$query = $CI->db->get('tbladmin');
if($query->num_rows() == 0)
	show_error('id không chính xác');

foreach($query->result() as $row)
{
	$taikhoan = $row->Tenadmin;
	$active = $row->active;
	$quyen = $row->quyen;
}

echo form_open('admin/quanly/thuchiensuataikhoan/'.$page);
?>
<table border="0" width="100%">
  <tr>
    <td align="right">ID:</td>
    <td align="left"><input type="text" readonly name="id" value="<?=$id?>"/></td>
  </tr>
  <tr>
    <td align="right">Tài khoản:</td>
    <td align="left"><input type="text" readonly name="account" value="<?=$taikhoan?>"/></td>
  </tr>
  <tr>
    <td align="right">Active:</td>
    <td align="left"><input name="active" type="checkbox" value="active" <?php if($active) echo 'checked' ?>/></td>
  </tr>
  <tr>
  	<td align="right">Quyền:</td>
    <td align="left">
    	<select name="quyen">
        	<option value="0" <?php if($quyen == 0) echo 'selected'; ?>>Admin</option>
            <option value="1" <?php if($quyen == 1) echo 'selected'; ?>>Người dùng</option>
        </select>
    </td>
  </tr>
  <tr>
  	<td colspan="2" align="center">
    	<input type="submit" name="suataikhoan" value="Đồng ý"/>
        <input type="reset" name="reset" value="Làm lại"/>
    </td>
  </tr>
</table>

<?php
echo form_close();
?>